home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / INSTALL / WIN95.VRF < prev    next >
Encoding:
Text File  |  1995-09-29  |  3.6 KB  |  109 lines

  1. /* Copyright (c) Oracle Corporation 1993.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     win95.vrf - V3 common version analysis script for Windows 95 products
  5.  
  6.   DESCRIPTION
  7.     This script performs common version analysis functionality across product
  8.     VRF scripts.  It returns the variable 'doit', indictating whether the
  9.     installation is to proceed.  The variable 'version_status' is set to
  10.     one of four values: 'upgrade,'downgrade,'reinstall and 'new_install.
  11.  
  12.   OWNER
  13.     Kush Jain
  14.  
  15.   MODIFIED    DD-MMM-YY  Reason
  16.     sagarwal  11-JUL-95  Modified for windows 95 from nt.vrf
  17.     kjain     16-FEB-94  Created from unix.vrf.
  18. *****************************************************************************/
  19.  
  20. {
  21.   product_label = product_interface_label(current_product);
  22.  
  23.   ui_product(product_label);
  24.   analyze_depend = nls("analyze_depend",
  25.                "Analyzing %%product_label%% Dependencies...");
  26.   ui_action(instantiate(analyze_depend));
  27.  
  28.   { 
  29.     /* Check to make sure the required version of the Installer is running */
  30.  
  31.     required_version = product_version(w95instver);
  32.  
  33.     if (earlier_version(installer_version,required_version,4))
  34.       {
  35.         temp = explode(required_version,".");
  36.         required_version = implode(list(first(temp),first(rest(temp)),
  37.                                         first(rest(rest(temp))),
  38.                                         first(rest(rest(rest(temp))))),".");
  39.     information_dialog(instantiate(instver_too_early));
  40.     return(FALSE);
  41.       }
  42.   }
  43.     [ 'UNBOUND_VARIABLE: continue(); ]
  44.  
  45.   mark
  46.     if (registered(product_name(current_product)))
  47.       {
  48.         registry = registration(product_name(current_product));
  49.         current_version = product_version(current_product);
  50.         installed_version = registry_version(registry);
  51.   
  52.         if (earlier_version(registry,current_version))
  53.           {
  54.             version_status = 'upgrade;
  55.         if (verbose)
  56.           doit = yesno_dialog(instantiate(reinstall_prompt01),TRUE,
  57.                   instantiate(reinstall_content01),
  58.                   instantiate(reinstall_help01));
  59.         else
  60.           doit = TRUE;
  61.  
  62.             if (not(doit))
  63.               if (internally_called)
  64.                 information_dialog(instantiate(reinstall_prompt02),
  65.                                    instantiate(reinstall_content02),
  66.                                    instantiate(reinstall_help02));
  67.           }
  68.         else
  69.           {
  70.             if (later_version(registry,current_version))
  71.               version_status = 'downgrade;
  72.             else
  73.               version_status = 'reinstall;
  74.  
  75.             if (member(selected_products,current_product))
  76.               if (version_status == 'downgrade)
  77.                 doit = yesno_dialog(instantiate(reinstall_prompt03),FALSE,
  78.                                     instantiate(reinstall_content03),
  79.                                     instantiate(reinstall_help03));
  80.               else
  81.         {
  82.           if (verbose)
  83.             doit = yesno_dialog(instantiate(reinstall_prompt04),FALSE,
  84.                     instantiate(reinstall_content04),
  85.                     instantiate(reinstall_help04));
  86.           else
  87.             doit = TRUE;
  88.         }
  89.             else
  90.               doit = FALSE;
  91.           }
  92.       }
  93.     else
  94.       {
  95.         version_status = 'new_install;
  96.         doit = TRUE;
  97.       }
  98.  
  99.   if (doit)
  100.     {
  101.       if (not(member(products_for_installation,current_product)))
  102.     add(products_for_installation,current_product);
  103.     }
  104.   else if (member(selected_products,current_product))
  105.     ui_action(instantiate(nls("cancel_install","Cancelling Installation of %%product_label%%...")));
  106.  
  107.   return(doit);
  108. }
  109.